import { JSON } from "./JSON";
import { Log } from "../../../gengine/debug/Log";
//class JSONHelper
    
    export  class JSONHelper
    {
       

        public static deserialize(arg1: string)
        {
            var source: string;
            var result;

            var loc1;
            result = undefined;
            source = arg1;
            if (source == null || source == "") 
            {
                return new Object();
            }
            try 
            {
                result = JSON.deserialize(source);
            }
            catch (e)
            {
                result = new Object();
                Log.error("json解析错误：" + source);
            }
            return result;
        }

        public static serialize(arg1): string
        {
            return JSON.serialize(arg1);
        }
    }
